package com.leeoohoo.user.dto;

import com.leeoohoo.user.MyUser;
import com.leeoohoo.user.UserVerify;
import com.oohoo.spacestationspringbootstarter.dto.query.DTO;
import com.oohoo.spacestationspringbootstarter.dto.query.annotation.From;
import com.oohoo.spacestationspringbootstarter.validate.annotation.MyValidate;
import lombok.Data;

@Data
@From(MyUser.class)
public class InsertDTO implements DTO {

    @MyValidate(groupName = "usernameAndPhoneAndEmail", groupSize = 4, message = "用户名，手机，邮件不能重复", verify = UserVerify.class)
    private Long id;

    @MyValidate(groupName = "usernameAndPhoneAndEmail", groupSize = 4, message = "用户名，手机，邮件不能重复", verify = UserVerify.class)
    private String username;

    private String password;

    @MyValidate(groupName = "usernameAndPhoneAndEmail", groupSize = 4, message = "用户名，手机，邮件不能重复", verify = UserVerify.class)
    private String phone;

    @MyValidate(groupName = "usernameAndPhoneAndEmail", groupSize = 4, message = "用户名，手机，邮件不能重复", verify = UserVerify.class)
    private String email;

    private Integer age;

    private String job;

    private Long state;


}
